chore(release): Add start Y release script - #179
Conversation
E2E Test ResultsCommit: a375bd7 |
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds a Bash Y-stream release orchestrator that validates inputs, updates Tekton configuration, generates Konflux release resources, validates kustomize output, and commits local changes without pushing remotely. ChangesY-stream release workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseScript
participant ParentRepository
participant KonfluxReleaseData
participant BuildSingle
ReleaseScript->>ParentRepository: Create release branch and update Tekton configuration
ReleaseScript->>ParentRepository: Commit local changes
ReleaseScript->>KonfluxReleaseData: Generate release admissions and kustomization
KonfluxReleaseData->>BuildSingle: Validate tenant configuration
ReleaseScript->>KonfluxReleaseData: Commit local release-data changes
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/start-y-stream-release.sh`:
- Around line 106-114: The release branch creation in
prepare_stackrox_mcp_branch and prepare_konflux_data_branch is not rerun-safe.
In scripts/start-y-stream-release.sh lines 106-114 and 155-163, replace each git
checkout -b invocation with checkout -B using the same branch name and
origin/main base, and add a brief comment noting that reruns reset and discard
local unpushed commits on the existing release branch.
- Line 203: Remove the `select(. == "*")` filter from the `.patches[0].patch`
update in the release-generation command, and apply `sub("release-X.Y", ...)`
directly to the patch text. Preserve the existing VERSION substitution and match
the direct substitution pattern used by the nearby `.transformers[0]` update.
- Around line 132-136: Replace the fragile shell quote-splicing in the yq
expressions within the release script, including the repeated occurrences around
the metadata, service account, and extra-label updates, with yq’s env(NAME)
variable access. First verify that the yq version pinned by validate_inputs
supports the required env() string-concatenation semantics, then apply the
consistent expression style to all affected VERSION and VERSION_DASHED usages.
- Around line 189-190: Replace the hard-coded tags[2] and tags[3] assignments in
the release update flow with the same pattern-based sub() approach used by
create_release_kustomization, targeting the intended tag values by their
existing content rather than array position while preserving the VERSION and
timestamp substitutions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 4d1dca25-8ef9-46ed-95ee-ace21a4cbd19
📒 Files selected for processing (4)
scripts/start-y-stream-release.shscripts/templates/release-kustomization.yamlscripts/templates/release-plan-admission-prod.yamlscripts/templates/release-plan-admission-stage.yaml
6995c2d to
d8d039e
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/start-y-stream-release.sh`:
- Around line 106-114: Update prepare_stackrox_mcp_branch and the Konflux
checkout flow to run git status --porcelain and abort before either checkout
when the respective worktree is non-empty. In the release staging step, replace
broad git add -A with explicit staging of only the expected generated Konflux
files and directories.
In `@scripts/templates/release-plan-admission-stage.yaml`:
- Around line 39-42: Replace the mutable production branch revision for
release-service-catalog with an immutable commit SHA or tag in
scripts/templates/release-plan-admission-stage.yaml at lines 39-42 and
scripts/templates/release-plan-admission-prod.yaml at lines 39-42, keeping both
imported pipeline references pinned consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 3d8ef9b6-53f7-4be7-8fc8-96ca05cc80a4
📒 Files selected for processing (4)
scripts/start-y-stream-release.shscripts/templates/release-kustomization.yamlscripts/templates/release-plan-admission-prod.yamlscripts/templates/release-plan-admission-stage.yaml
d8d039e to
a375bd7
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/start-y-stream-release.sh`:
- Around line 25-26: Update the option parsing and help text in
start-y-stream-release.sh to recognize and document --dry-run. Propagate the
dry-run state through the release flow so it performs all validation and
preparation but skips both commits and pushes, including the corresponding paths
around the additional referenced option handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 35fb8de6-3b44-49d2-aaf3-d603e0579953
📒 Files selected for processing (4)
scripts/start-y-stream-release.shscripts/templates/release-kustomization.yamlscripts/templates/release-plan-admission-prod.yamlscripts/templates/release-plan-admission-stage.yaml
Description
Adds an automated script for starting Y-stream releases of the Agentic Cluster Security Suite. Previously, creating a new release stream required manual edits across two repositories (stackrox-mcp and konflux-release-data), which was error-prone and time-consuming.
The script
scripts/start-y-stream-release.shtakes a version (e.g.,1.5) and the path to the konflux-release-data repo, then:In stackrox-mcp:
release-x.ybranch fromorigin/mainyqIn konflux-release-data:
agentic-suite-release-x-ybranch fromorigin/mainbuild-single.shto validate kustomize buildYAML templates with
X.Y/X-Yplaceholders are stored inscripts/templates/.Validation
yqversion check works (requires >= 4.52.1 for--yaml-compact-seq-indent)build-single.shkustomize build succeedsAI-assisted development prompts
This PR was developed with AI assistance. Below are the prompts used: